<template>
  <el-dropdown trigger="click" @command="handleCommand">
  <span class="el-dropdown-link">
    <i class="el-icon-more cp"></i>
  </span>
    <el-dropdown-menu slot="dropdown" class="moveup20">
      <el-dropdown-item icon="el-icon-edit" command="rename">重命名</el-dropdown-item>
      <el-dropdown-item icon="el-icon-sold-out" command="movetofolder">移动至文件夹</el-dropdown-item>
      <el-dropdown-item icon="el-icon-delete" command="delete">删除</el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
export default {
  props: {
    id: {
      type: String
    }
  },
  name: 'MorePageComponent',
  data () {
    return {}
  },
  methods: {
    handleCommand (command) {
      // 触发操作
      this.$emit('open', command, this.$props.id)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
